	<style type="text/css">
        .click
        {
            opacity: 0.9;
            height:45px;
            width:250px ;
            border-radius: 5px;
            
        }
        .click:hover
        {
            opacity: 1;
        }
    </style>
    <?php
        if(isset($_SESSION["MaTaiKhoan"])==true) 
        {
            echo '<div style="margin-right: 0px; margin-bottom: 5px;">';
            echo '<a href="trangchu.php?act=9">';
            echo '<img class="click" src="images/QLTaiKhoan.jpg"/></a></div>';
        }
        
        if(isset($_SESSION["MaTaiKhoan"])==true)
        {
            
            include_once("template/DataProvider.php");
            $MaND = $_SESSION["MaTaiKhoan"];
			$query = "SELECT * FROM nguoidung WHERE MaND = '".$MaND."'";
			$result = DataProvider::ExecuteQuery($query);
            $row = mysql_fetch_array($result);
            if ($row['MaLND'] == 0)
            {
                echo '<div style="margin-right: 0px; margin-bottom: 5px">';
                echo '<a href="trangchu.php?act=10&id='; echo $row["MaND"]; echo '">';
                echo '<img class="click" src="images/upSP.jpg"/></a></div>';
            }
                
        }

    
        if(isset($_SESSION["MaTaiKhoan"])==true)
        {
            $MaND = $_SESSION["MaTaiKhoan"];
            if(isset($_REQUEST['id']) && isset($_REQUEST['act']))
            {
                if ($_REQUEST['act'] == 4)
                {
                    $MaSP=$_REQUEST['id'];
                    include_once("template/DataProvider.php");
                    $query = " SELECT * FROM sanpham sp, nguoidung nd WHERE sp.MaND = '".$MaND."'  AND sp.MaSP = '".$MaSP."' AND sp.MaND = nd.MaND  " ;
                    $result = DataProvider::executeQuery($query);
                    $row = mysql_fetch_array($result);
                    if($row == true)
                    {
                        if ($row['MaLND'] == 0)
                        {
                            echo '<div style="margin-right: 0px;">';
                            echo '<a href="trangchu.php?act=11&id='; echo $row["MaSP"]; echo '">';
                            echo '<img class="click" src="images/editSP.jpg"/></a></div>';
                        }
                    }
                }
            }
        }
    ?>
    
    
    
    
    <div id="Search">
    <div class="head">TÌM KIẾM</div>
    <form name="search" id="search" action="#" method="get">
    <table cellspacing="10" border="0" style="font-size:12px">
    <tr><td colspan="2">Từ Khóa:<input type="text" name="key" value="Nhập từ khóa..." onclick="this.value=''" onblur="if(this.value=='') this.value='Nhập từ khóa...'" style="color: #999;"  /></td></tr>
    <tr>
    <td align="right">Giá Từ:</td>
    <td>
    <select id="from" name="from" >
    <option  value="0">&nbsp;&nbsp;--Từ--&nbsp;&nbsp;</option>
    <option  value="1">1 Đồng</option>
    <option  value="1000000">1 Triệu</option>
    <option  value="3000000">3 Triệu</option>
    <option  value="5000000">5 Triệu</option>
	<option  value="7000000">7 Triệu</option>
	<option  value="10000000">10 Triệu</option>
	<option  value="15000000">15 Triệu</option>
	<option  value="20000000">20 Triệu</option>
	<option  value="25000000">25 Triệu</option>
	<option  value="30000000">30 Triệu</option>
	<option value="40000000">40 Triệu</option>
	<option value="50000000">50 Triệu</option>
 	</select>
    </td>
    </tr>
    <tr>
    <td align="right">Đến:</td>
    <td>
    <select id="to" name="to">
    <option  value="0">&nbsp;--Đến--&nbsp;&nbsp;</option>
    <option  value="500000">500 Ngàn</option>
    <option  value="2000000">2 Triệu</option>
    <option  value="3000000">4 Triệu</option>
    <option  value="6000000">6 Triệu</option>
    <option  value="8000000">8 Triệu</option>
	<option  value="10000000">10 Triệu</option>
	<option  value="15000000">15 Triệu</option>
	<option  value="20000000">20 Triệu</option>
	<option  value="30000000">30 Triệu</option>
	<option  value="50000000">50 Triệu</option>
	<option  value="100000000">100 Triệu</option>
    </select>
    </td>
    </tr>
    <tr><td colspan="2" align="center"><input type="submit" value="Tìm Kiếm" class="button" />
    </td></tr>
    <tr>
        <td colspan="2" align="center">
            <a href="trangchu.php?act=18"><img style="width: 180px; height: 30px;" class="click" src="images/timkiemnangcao.jpg" /></a>
        </td>
    </tr>
    </table>
    </form>
    </div>
    <!-------------- khung Search gồm 3 Thông tin, Từ Khóa..., Giá từ...  đến ..., và submit -->
   
   
   
   
   
    <div id="Help">
    <div class="head">HỖ TRỢ TRỰC TUYẾN</div>
    
    <div id="yahoo"> <!--yahoo -->
    <table border="0" width="250px" >
    <tr>
    <td align="right"><a title="Đức" href="ymsgr:SendIM?sailorpirateghost"><img border="0" src="http://mail.opi.yahoo.com/online?u=sailorpirateghost&amp;m=g&amp;t=2" width="101" height="21"></a></td>
    <td>&nbsp;Mr.Đức<td>
    <td><img src="images/people4.png" width="40" height="45"/></td></tr>
 
    <tr>
    <td align="right"><a title="Quang" href="ymsgr:SendIM?ng.thanhquang"><img border="0" src="http://mail.opi.yahoo.com/online?u=ng.thanhquang&amp;m=g&amp;t=2" width="101" height="21"></a></td>
    <td>&nbsp;Mr.Quang<td>
    <td><img src="images/people4.png" width="40" height="45"/></td> </tr>
    
    <tr>
    <td align="right"><a title="Lợi" href="ymsgr:SendIM?romeo_tim_juliet_210"><img border="0" src="http://mail.opi.yahoo.com/online?u=romeo_tim_juliet_210&amp;m=g&amp;t=2" width="101" height="21"></a></td>
    <td>&nbsp;Mr.Lợi<td>
    <td><img src="images/people4.png" width="40" height="45"/></td></tr>
    </table>
    </div>
    </div>
    <!-------------------------- Chứa yahoo các nhân viên giúp đỡ  ----------------------->
   
   
   
   
   
   
    <div id="Info">
    <div class="head">TIN TỨC & SỰ KIỆN</div>
    <h3 style="color: #cc1414; text-align: center; text-shadow:1px 1px #b3b3b3;">SẮP RA MẮT!</h3><br /><br />
    
    
	<a href="#"><img src="./images/tintuc1.jpg" style="margin-left: 30px;" width="200" height="135" /> </a>
    <h4 style="color: #0f5ebf; text-align: center;">Asus Transformer Book 32GB</h4>
    
    <a href="#"><img src="./images/tintuc2.jpg" style="margin-left: 30px;" width="200" height="135" /> </a>
    <h4 style="color: #0f5ebf; text-align: center;">Ipad 5 64GB</h4>
    
    <a href="#"><img src="./images/tintuc3.jpg" style="margin-left: 30px;" width="200" height="135" /> </a>
    <h4 style="color: #0f5ebf; text-align: center;">Microsoft Surface 128GB</h4>
    </div>
    <!-- end tin tức-->
    
    <div id="Info">
    <div class="head">Ngoại tệ & Thời tiết</div>
    <table border="0" cellpadding="0" cellspacing="0" class="block_green1" width="220px">
    <tr>
        <td width="90%"><div class="redtitle">Tỷ giá ngoại tệ</div></td>
        <td width="10%">
        <img id="AdTyGia" src="images/AdImgUp.gif" border="0" onclick='SetViewTableDiv(this.id);'/>
        </td>
    </tr>
    <tr>
        <td colspan="2">
        <div id="AdTyGiaLoc">
        <script type="text/javascript" language="JavaScript" src="http://www.vnexpress.net/Service/Forex_Content.js"></script>
        <script type="text/javascript" language="JavaScript" src="js/tygia.js"></script>
        </div>
        </td>
    </tr>
    </table>

        <img alt="" src="images/spacer.gif" width="220" height="8" />

    <table border="0" cellpadding="0" cellspacing="0" class="block_green1" width="220px">
    <tr>
        <td width="90%"><div class="redtitle">Giá vàng SBJ</div></td>
        <td width="10%">
        <img id="AdGiaVang" src="images/AdImgUp.gif" border="0" onclick='SetViewTableDiv(this.id);'/>    
        </td>
    </tr>
    <tr>
        <td colspan="2">
        <div id="AdGiaVangLoc">
        <script type="text/javascript" language="JavaScript" src="http://www.vnexpress.net/Service/Gold_Content.js"></script>
        <script type="text/javascript" language="JavaScript" src="js/giavang.js"></script>
        </div>
        </td>
    </tr>			
    </table>

        <img alt="" src="images/spacer.gif" width="220" height="8" />

    <table border="0" class="block_blue1" cellpadding="0" cellspacing="0" width="220px">
    <tr>
        <td width="90%">
        <div class="redtitle">Thời tiết</div>
        </td>
        <td width="10%">
        <img id="AdThoiTiet" src="images/AdImgUp.gif" border="0" onclick='SetViewTableDiv(this.id);'/>    
        </td>
    </tr>
    <tr>
        <td colspan="2">
        <div id="AdThoiTietLoc">
        <script type="text/javascript" language="JavaScript" src="http://www.vnexpress.net/Service/Weather_Content.js"></script>
        <script type="text/javascript" language="JavaScript" src="js/thoitiet.js"></script>
        </div>
        </td>
    </tr>
    </table>
    <br />
    </div>

    <!-- end ngoai tệ -->
    
    
    <div id="QuangCao">
    <div class="head" style="text-align: center;">QUẢNG CÁO</div> 
        <a href="#"><img src="./images/quangcao1.jpg" style="margin-left: 50px; width: 149px; height: 300px;"/> </a>
        <a href="#"><img src="./images/quangcao2.jpg" style="margin-left: 50px; width: 149px; height: 300px;"/> </a>
    </div>
    <!-- Quảng Cáo flash, hay hình gì đó... de đại 1 cái hình nơi dành cho quảng cáo rùi 
    tính típ -->